﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace TrenchcoatRobots.Datatypes {
	enum AnimationPlayback { Single, Loop, BackAndForth };
	/// <summary>
	/// Animation datatype. Constant framerate of animation is required
	/// </summary>
	class Animation {
		public List<Rectangle> Frames;
		public float SampleRate { get; private set; }
		public float AnimationLength { get { return SampleRate * Frames.Count; } }
		public AnimationPlayback CurrentAnimPlayback { get; set; }

		public Animation( List<Rectangle> frames, float sampleRate, AnimationPlayback animPlaybackMethod ) {
			Frames = frames;
			CurrentAnimPlayback = animPlaybackMethod;
			SampleRate = sampleRate;
		}
	}
}
